package com.sand.feign;

import com.sand.dto.Select.UserSelect;
import com.sand.dto.supplier.AddSupplier;
import com.sand.dto.supplier.SupplierDto;
import com.sand.entity.sell.Debt;
import com.sand.entity.sell.Purchase;
import com.sand.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("juao-supplier")
public interface supplierFeign {

    /**
     * 查询供货商
     */
    @PostMapping("/supplier/select")
    ResponseResult<SupplierDto> select(@RequestBody UserSelect userSelect);


    /**
     * 添加货款债务
     */
    @PostMapping("/debt/add")
    ResponseResult<Integer> add(@RequestBody Debt debt);


    /**
     * id查询采购单
     */
    @PostMapping("/purchase/gid")
    public ResponseResult<Purchase> gid(@RequestBody Integer purchaseid);


    /**
     * 完成采购
     */
    @PostMapping("/purchase/ok")
    ResponseResult<Integer> ok(@RequestBody Integer purchaseid);

}
